package controllor.smartblog.org;

import java.util.HashMap;
import java.util.Map;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.smartblog.core.annotation.Resource;
import org.smartblog.core.annotation.Router;
import org.smartblog.core.render.Render;

/**
 * Create Date:2013-12-5
 * @author wanghx
 */
@Router(path = "/user",index = "admin")
public class User {
	private String view = "/hello.html";
	
	public void admin(HttpServletRequest request,HttpServletResponse response){
		Map<String, Object> root = new HashMap<String, Object>();
		root.put("name", "Admin");
		Render.rend(request, response, view, root);
	}
	
	@Resource(value = "/{user}/{friend}")
	public void lily(HttpServletRequest request,HttpServletResponse response,String user,String friend){
		Map<String, Object> root = new HashMap<String, Object>();
		root.put("name", user);
		root.put("friend", friend);
		Render.rend(request, response, view, root);
	}
	
}
